package org.example.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.example.common.BaseResponse;
import org.example.common.ResultUtils;
import org.example.domain.Recommend;
import org.example.service.RecommendService;
import org.example.vo.RecommendVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/personal")
public class PersonalController {
    @Autowired
    private RecommendService recommendService;
    @RequestMapping("/history/{id}")
    public BaseResponse<List<RecommendVO>> history(@PathVariable int id, @RequestParam int pageSize, @RequestParam int pageNum){
        List<RecommendVO> recommendList = recommendService.getRecommendList(pageSize, pageNum,id);
        return ResultUtils.success(recommendList);
    }
    @RequestMapping("/concat")
    public BaseResponse<String> getConcat(){
        return ResultUtils.success("本项目是一个旅游智能推荐系统，您可以输入自己的情绪，我们会给您提供参考选项");
    }
    @PostMapping("/profile")
    public BaseResponse<String> getProfile(@RequestBody String userName){
        return ResultUtils.success("您好，"+userName+"，欢迎来到旅游智能推荐系统");
    }
}
